require 'set'

class TicketMailer < ActionMailer::Base

  def notice(ticket)
    list = [ticket.created_by.email ]
    list << ticket.assign_to.email if ticket.assign_to
    @recipients = list.compact.to_set.to_a
  end
end
